import re

# 打开文件并读取
with open('insn.txt', 'r', encoding='utf-8') as file:
    for line in file:
        insn = line.strip()

        pattern = r'^csr\w*'
        match = re.match(pattern, insn)
        if match:
            print(f'        "{insn}": ("IXU", "Su", ["Zicsr"]),')
            continue

        pattern = r'^f\w*'
        match = re.match(pattern, insn)
        if match:
            print(f'        "{insn}": ("FXU", "Fadd", ["F"]),')
            continue

        pattern = r'^v\w*'
        match = re.match(pattern, insn)
        if match:
            print(f'        "{insn}": ("VXU-ArithPipe", "AddUnit", ["V"]),')
        else:
            print(f'        "{insn}": ("IXU", "Xu", ["I"]),')

